﻿#pragma once
// Copyright (c) lanyeo 2020-2021
// Licenced under MIT license. See https://opensource.org/licenses/MIT for details.
// code style
// 1. use forward declaration (尽可能使用前置声明)
// 2. include file sequence [other project>c>c++>third>self project]
// 

#include <cstdint>
#include <cstdlib>
#include <ctime>

namespace fist
{
    // 使用最简单的方式获取随机数[0, b)
    inline uint32_t simple_rand(uint32_t b)
    {
        return rand() % b;
    }
    // 使用最简单的方式获取随机数[a, b)
    inline int32_t simple_rand(int32_t a, int32_t b)
    {
        return rand() % (b - a) + a;
    }
}
